package com.dcloud.flow.controller;

import com.dcloud.flow.entity.AipComp;
import com.dcloud.flow.mapper.xml.NodeVO;
import org.jeecg.common.api.vo.Result;
import com.dcloud.flow.service.IAipCompService;

import lombok.extern.slf4j.Slf4j;

import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;

import java.util.List;

/**
 * @Description: aip_comp
 * @Author: jeecg-boot
 * @Date:   2023-07-25
 * @Version: V1.0
 */
@Api(tags="aip_comp")
@RestController
@RequestMapping("/api/aipcomp/v1")
@Slf4j
public class AipCompController extends JeecgController<AipComp, IAipCompService> {
	@Autowired
	private IAipCompService aipCompService;
	
	/**
	 * 组件列表树形查询
	 *
	 * @return
	 */
	@AutoLog(value = "组件列表树形查询")
	@ApiOperation(value="组件列表树形查询", notes="组件列表树形查询")
	@GetMapping(value = "/tree")
	public Result<?> tree() {
		List<NodeVO> tree = aipCompService.tree();
		return Result.OK(tree);
	}

}
